'use strict';

module.exports = app => {
  const mongoose = app.mongoose;
  const Schema = mongoose.Schema;
  const ObjectId = Schema.ObjectId;

  const ExpertProductSchema = new Schema({
    expert_id: { type: ObjectId },
    product_id: { type: ObjectId },
    create_at: { type: Date, default: Date.now },
    update_at: { type: Date, default: Date.now },
    deleted: { type: Boolean, default: false },
  });

  return mongoose.model('ExpertProduct', ExpertProductSchema);
};
